{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "c100ee77",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from sklearn import datasets\n",
    "\n",
    "\n",
    "iris = datasets.load_iris()\n",
    "data = iris.data\n",
    "target = iris.target\n",
    "\n",
    "class NeuralNetwork:\n",
    "    def __init__(self, in_size, o_size, h_size):\n",
    "        # 初始化层的数量\n",
    "        self.in_size = in_size\n",
    "        self.o_size = o_size\n",
    "        self.h_size = h_size\n",
    "        \n",
    "        self.W1 = np.random.randn(in_size, h_size) # n x b的矩阵\n",
    "        self.W2 = np.random.randn(h_size, o_size) # b x k的矩阵\n",
    "        \n",
    "    def sigmod(self, x):\n",
    "        return 1 / (1 + np.exp(-x))\n",
    "    \n",
    "    # 映射函数,将连续值变成离散值\n",
    "    def ref(self, x):\n",
    "        if x <= (1 / 3):\n",
    "            return 0\n",
    "        elif x <= (2 / 3):\n",
    "            return 1\n",
    "        else:\n",
    "            return 2\n",
    "        \n",
    "    # 设输入X为 m x n的矩阵\n",
    "    def forward(self, X):\n",
    "        vec_rule = np.vectorize(self.ref)\n",
    "        self.z2 = np.dot(X, self.W1) # m x b\n",
    "        self.act2 = self.sigmod(self.z2)\n",
    "        self.z3 = np.dot(self.act2, self.W2)# m x k\n",
    "        self.y_hat = self.sigmod(self.z3)\n",
    "        self.y_hat = vec_rule(self.y_hat)\n",
    "        \n",
    "        return self.y_hat\n",
    "    # 设y为 m x k 的矩阵\n",
    "    def backward(self, X, y, y_hat, leraning_rate):\n",
    "        vec_rule_prime = np.vectorize(self.rule_prime)\n",
    "        # 算出输出层的梯度顶\n",
    "        Grd_1 = (y - y_hat) *  self.sigmod(self.z3) * (1 - self.sigmod(self.z3)) # m x k\n",
    "        # 输出层的Δ值\n",
    "        Delta_W2 = np.dot(self.act2.T, Grd_1) # b x k\n",
    "        # 隐藏层的梯度顶\n",
    "        Grd_2 = np.dot(Grd_1, self.W2.T) * self.sigmod(self.z2) * (1 - self.sigmod(self.z2)) # m x b\n",
    "        # 隐藏层的Δ值\n",
    "        Delta_W1 = np.dot(X.T, Grd_2) # n x b\n",
    "        \n",
    "        # 更新权值\n",
    "        self.W1 += leraning_rate * Delta_W1\n",
    "        self.W2 += leraning_rate * Delta_W2\n",
    "        \n",
    "    def tarin(self, X, y, learning_rate, num_epochs):\n",
    "        # 检查形状\n",
    "        if(X.shape[0] != y.shape[0]):\n",
    "            return -1;\n",
    "        for i in range(1, num_epochs + 1):\n",
    "            y_hat = self.forward(X)\n",
    "            self.backward(X, y, self.y_hat, learning_rate)\n",
    "        # 输出均方误差\n",
    "            loss = np.mean((y - y_hat) ** 2)\n",
    "            print(f\"loss = {loss}, epochs/num_epochs:{i}/{num_epochs}\")\n",
    "    def predict(self, X):\n",
    "        y_pred = self.forward(X)\n",
    "        return y_pred\n",
    "        \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "f4d81357",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "loss = 0.8438095238095238, epochs/num_epochs:1/1000\n",
      "loss = 0.7619047619047619, epochs/num_epochs:2/1000\n",
      "loss = 0.6838095238095238, epochs/num_epochs:3/1000\n",
      "loss = 0.6476190476190476, epochs/num_epochs:4/1000\n",
      "loss = 0.6466666666666666, epochs/num_epochs:5/1000\n",
      "loss = 0.6428571428571429, epochs/num_epochs:6/1000\n",
      "loss = 0.6428571428571429, epochs/num_epochs:7/1000\n",
      "loss = 0.6447619047619048, epochs/num_epochs:8/1000\n",
      "loss = 0.6438095238095238, epochs/num_epochs:9/1000\n",
      "loss = 0.6447619047619048, epochs/num_epochs:10/1000\n",
      "loss = 0.6419047619047619, epochs/num_epochs:11/1000\n",
      "loss = 0.6419047619047619, epochs/num_epochs:12/1000\n",
      "loss = 0.6419047619047619, epochs/num_epochs:13/1000\n",
      "loss = 0.6419047619047619, epochs/num_epochs:14/1000\n",
      "loss = 0.6419047619047619, epochs/num_epochs:15/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:16/1000\n",
      "loss = 0.6419047619047619, epochs/num_epochs:17/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:18/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:19/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:20/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:21/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:22/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:23/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:24/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:25/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:26/1000\n",
      "loss = 0.6409523809523809, epochs/num_epochs:27/1000\n",
      "loss = 0.64, epochs/num_epochs:28/1000\n",
      "loss = 0.64, epochs/num_epochs:29/1000\n",
      "loss = 0.64, epochs/num_epochs:30/1000\n",
      "loss = 0.64, epochs/num_epochs:31/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:32/1000\n",
      "loss = 0.64, epochs/num_epochs:33/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:34/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:35/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:36/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:37/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:38/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:39/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:40/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:41/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:42/1000\n",
      "loss = 0.6390476190476191, epochs/num_epochs:43/1000\n",
      "loss = 0.638095238095238, epochs/num_epochs:44/1000\n",
      "loss = 0.638095238095238, epochs/num_epochs:45/1000\n",
      "loss = 0.6371428571428571, epochs/num_epochs:46/1000\n",
      "loss = 0.6371428571428571, epochs/num_epochs:47/1000\n",
      "loss = 0.6361904761904762, epochs/num_epochs:48/1000\n",
      "loss = 0.6342857142857142, epochs/num_epochs:49/1000\n",
      "loss = 0.6323809523809524, epochs/num_epochs:50/1000\n",
      "loss = 0.6314285714285715, epochs/num_epochs:51/1000\n",
      "loss = 0.6323809523809524, epochs/num_epochs:52/1000\n",
      "loss = 0.6295238095238095, epochs/num_epochs:53/1000\n",
      "loss = 0.6285714285714286, epochs/num_epochs:54/1000\n",
      "loss = 0.6257142857142857, epochs/num_epochs:55/1000\n",
      "loss = 0.6266666666666667, epochs/num_epochs:56/1000\n",
      "loss = 0.6247619047619047, epochs/num_epochs:57/1000\n",
      "loss = 0.6228571428571429, epochs/num_epochs:58/1000\n",
      "loss = 0.6228571428571429, epochs/num_epochs:59/1000\n",
      "loss = 0.6228571428571429, epochs/num_epochs:60/1000\n",
      "loss = 0.621904761904762, epochs/num_epochs:61/1000\n",
      "loss = 0.6209523809523809, epochs/num_epochs:62/1000\n",
      "loss = 0.6209523809523809, epochs/num_epochs:63/1000\n",
      "loss = 0.6180952380952381, epochs/num_epochs:64/1000\n",
      "loss = 0.6180952380952381, epochs/num_epochs:65/1000\n",
      "loss = 0.6180952380952381, epochs/num_epochs:66/1000\n",
      "loss = 0.6171428571428571, epochs/num_epochs:67/1000\n",
      "loss = 0.6161904761904762, epochs/num_epochs:68/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:69/1000\n",
      "loss = 0.6152380952380953, epochs/num_epochs:70/1000\n",
      "loss = 0.6152380952380953, epochs/num_epochs:71/1000\n",
      "loss = 0.6152380952380953, epochs/num_epochs:72/1000\n",
      "loss = 0.6152380952380953, epochs/num_epochs:73/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:74/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:75/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:76/1000\n",
      "loss = 0.6123809523809524, epochs/num_epochs:77/1000\n",
      "loss = 0.6123809523809524, epochs/num_epochs:78/1000\n",
      "loss = 0.6123809523809524, epochs/num_epochs:79/1000\n",
      "loss = 0.6133333333333333, epochs/num_epochs:80/1000\n",
      "loss = 0.6133333333333333, epochs/num_epochs:81/1000\n",
      "loss = 0.6133333333333333, epochs/num_epochs:82/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:83/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:84/1000\n",
      "loss = 0.6142857142857143, epochs/num_epochs:85/1000\n",
      "loss = 0.6133333333333333, epochs/num_epochs:86/1000\n",
      "loss = 0.6123809523809524, epochs/num_epochs:87/1000\n",
      "loss = 0.6123809523809524, epochs/num_epochs:88/1000\n",
      "loss = 0.6114285714285714, epochs/num_epochs:89/1000\n",
      "loss = 0.6104761904761905, epochs/num_epochs:90/1000\n",
      "loss = 0.6104761904761905, epochs/num_epochs:91/1000\n",
      "loss = 0.6104761904761905, epochs/num_epochs:92/1000\n",
      "loss = 0.6104761904761905, epochs/num_epochs:93/1000\n",
      "loss = 0.6095238095238096, epochs/num_epochs:94/1000\n",
      "loss = 0.6085714285714285, epochs/num_epochs:95/1000\n",
      "loss = 0.6066666666666667, epochs/num_epochs:96/1000\n",
      "loss = 0.6057142857142858, epochs/num_epochs:97/1000\n",
      "loss = 0.6057142857142858, epochs/num_epochs:98/1000\n",
      "loss = 0.6057142857142858, epochs/num_epochs:99/1000\n",
      "loss = 0.6047619047619047, epochs/num_epochs:100/1000\n",
      "loss = 0.6028571428571429, epochs/num_epochs:101/1000\n",
      "loss = 0.6019047619047619, epochs/num_epochs:102/1000\n",
      "loss = 0.6028571428571429, epochs/num_epochs:103/1000\n",
      "loss = 0.6028571428571429, epochs/num_epochs:104/1000\n",
      "loss = 0.6, epochs/num_epochs:105/1000\n",
      "loss = 0.5980952380952381, epochs/num_epochs:106/1000\n",
      "loss = 0.5971428571428572, epochs/num_epochs:107/1000\n",
      "loss = 0.5961904761904762, epochs/num_epochs:108/1000\n",
      "loss = 0.5952380952380952, epochs/num_epochs:109/1000\n",
      "loss = 0.5933333333333334, epochs/num_epochs:110/1000\n",
      "loss = 0.5933333333333334, epochs/num_epochs:111/1000\n",
      "loss = 0.5914285714285714, epochs/num_epochs:112/1000\n",
      "loss = 0.5914285714285714, epochs/num_epochs:113/1000\n",
      "loss = 0.5895238095238096, epochs/num_epochs:114/1000\n",
      "loss = 0.5885714285714285, epochs/num_epochs:115/1000\n",
      "loss = 0.5866666666666667, epochs/num_epochs:116/1000\n",
      "loss = 0.5857142857142857, epochs/num_epochs:117/1000\n",
      "loss = 0.5857142857142857, epochs/num_epochs:118/1000\n",
      "loss = 0.5847619047619048, epochs/num_epochs:119/1000\n",
      "loss = 0.5828571428571429, epochs/num_epochs:120/1000\n",
      "loss = 0.5828571428571429, epochs/num_epochs:121/1000\n",
      "loss = 0.5819047619047619, epochs/num_epochs:122/1000\n",
      "loss = 0.580952380952381, epochs/num_epochs:123/1000\n",
      "loss = 0.58, epochs/num_epochs:124/1000\n",
      "loss = 0.5771428571428572, epochs/num_epochs:125/1000\n",
      "loss = 0.579047619047619, epochs/num_epochs:126/1000\n",
      "loss = 0.5771428571428572, epochs/num_epochs:127/1000\n",
      "loss = 0.5771428571428572, epochs/num_epochs:128/1000\n",
      "loss = 0.5761904761904761, epochs/num_epochs:129/1000\n",
      "loss = 0.5771428571428572, epochs/num_epochs:130/1000\n",
      "loss = 0.5761904761904761, epochs/num_epochs:131/1000\n",
      "loss = 0.5761904761904761, epochs/num_epochs:132/1000\n",
      "loss = 0.5761904761904761, epochs/num_epochs:133/1000\n",
      "loss = 0.5761904761904761, epochs/num_epochs:134/1000\n",
      "loss = 0.5761904761904761, epochs/num_epochs:135/1000\n",
      "loss = 0.5752380952380952, epochs/num_epochs:136/1000\n",
      "loss = 0.5752380952380952, epochs/num_epochs:137/1000\n",
      "loss = 0.5752380952380952, epochs/num_epochs:138/1000\n",
      "loss = 0.5742857142857143, epochs/num_epochs:139/1000\n",
      "loss = 0.5733333333333334, epochs/num_epochs:140/1000\n",
      "loss = 0.5723809523809524, epochs/num_epochs:141/1000\n",
      "loss = 0.5723809523809524, epochs/num_epochs:142/1000\n",
      "loss = 0.5723809523809524, epochs/num_epochs:143/1000\n",
      "loss = 0.5723809523809524, epochs/num_epochs:144/1000\n",
      "loss = 0.5723809523809524, epochs/num_epochs:145/1000\n",
      "loss = 0.5723809523809524, epochs/num_epochs:146/1000\n",
      "loss = 0.5714285714285714, epochs/num_epochs:147/1000\n",
      "loss = 0.5714285714285714, epochs/num_epochs:148/1000\n",
      "loss = 0.5704761904761905, epochs/num_epochs:149/1000\n",
      "loss = 0.5666666666666667, epochs/num_epochs:150/1000\n",
      "loss = 0.5666666666666667, epochs/num_epochs:151/1000\n",
      "loss = 0.5676190476190476, epochs/num_epochs:152/1000\n",
      "loss = 0.5647619047619048, epochs/num_epochs:153/1000\n",
      "loss = 0.5647619047619048, epochs/num_epochs:154/1000\n",
      "loss = 0.5628571428571428, epochs/num_epochs:155/1000\n",
      "loss = 0.5619047619047619, epochs/num_epochs:156/1000\n",
      "loss = 0.56, epochs/num_epochs:157/1000\n",
      "loss = 0.5552380952380952, epochs/num_epochs:158/1000\n",
      "loss = 0.5504761904761905, epochs/num_epochs:159/1000\n",
      "loss = 0.5485714285714286, epochs/num_epochs:160/1000\n",
      "loss = 0.5476190476190477, epochs/num_epochs:161/1000\n",
      "loss = 0.5466666666666666, epochs/num_epochs:162/1000\n",
      "loss = 0.5457142857142857, epochs/num_epochs:163/1000\n",
      "loss = 0.5447619047619048, epochs/num_epochs:164/1000\n",
      "loss = 0.540952380952381, epochs/num_epochs:165/1000\n",
      "loss = 0.539047619047619, epochs/num_epochs:166/1000\n",
      "loss = 0.5361904761904762, epochs/num_epochs:167/1000\n",
      "loss = 0.5342857142857143, epochs/num_epochs:168/1000\n",
      "loss = 0.5352380952380953, epochs/num_epochs:169/1000\n",
      "loss = 0.5323809523809524, epochs/num_epochs:170/1000\n",
      "loss = 0.5276190476190477, epochs/num_epochs:171/1000\n",
      "loss = 0.5247619047619048, epochs/num_epochs:172/1000\n",
      "loss = 0.5238095238095238, epochs/num_epochs:173/1000\n",
      "loss = 0.5190476190476191, epochs/num_epochs:174/1000\n",
      "loss = 0.5171428571428571, epochs/num_epochs:175/1000\n",
      "loss = 0.5152380952380953, epochs/num_epochs:176/1000\n",
      "loss = 0.5142857142857142, epochs/num_epochs:177/1000\n",
      "loss = 0.5114285714285715, epochs/num_epochs:178/1000\n",
      "loss = 0.5114285714285715, epochs/num_epochs:179/1000\n",
      "loss = 0.5104761904761905, epochs/num_epochs:180/1000\n",
      "loss = 0.5095238095238095, epochs/num_epochs:181/1000\n",
      "loss = 0.5085714285714286, epochs/num_epochs:182/1000\n",
      "loss = 0.5076190476190476, epochs/num_epochs:183/1000\n",
      "loss = 0.5019047619047619, epochs/num_epochs:184/1000\n",
      "loss = 0.5028571428571429, epochs/num_epochs:185/1000\n",
      "loss = 0.4990476190476191, epochs/num_epochs:186/1000\n",
      "loss = 0.4990476190476191, epochs/num_epochs:187/1000\n",
      "loss = 0.4980952380952381, epochs/num_epochs:188/1000\n",
      "loss = 0.49714285714285716, epochs/num_epochs:189/1000\n",
      "loss = 0.4961904761904762, epochs/num_epochs:190/1000\n",
      "loss = 0.49523809523809526, epochs/num_epochs:191/1000\n",
      "loss = 0.49333333333333335, epochs/num_epochs:192/1000\n",
      "loss = 0.49142857142857144, epochs/num_epochs:193/1000\n",
      "loss = 0.49047619047619045, epochs/num_epochs:194/1000\n",
      "loss = 0.4895238095238095, epochs/num_epochs:195/1000\n",
      "loss = 0.4895238095238095, epochs/num_epochs:196/1000\n",
      "loss = 0.48857142857142855, epochs/num_epochs:197/1000\n",
      "loss = 0.48857142857142855, epochs/num_epochs:198/1000\n",
      "loss = 0.4866666666666667, epochs/num_epochs:199/1000\n",
      "loss = 0.4819047619047619, epochs/num_epochs:200/1000\n",
      "loss = 0.47904761904761906, epochs/num_epochs:201/1000\n",
      "loss = 0.47904761904761906, epochs/num_epochs:202/1000\n",
      "loss = 0.47714285714285715, epochs/num_epochs:203/1000\n",
      "loss = 0.47619047619047616, epochs/num_epochs:204/1000\n",
      "loss = 0.47333333333333333, epochs/num_epochs:205/1000\n",
      "loss = 0.4714285714285714, epochs/num_epochs:206/1000\n",
      "loss = 0.4704761904761905, epochs/num_epochs:207/1000\n",
      "loss = 0.4704761904761905, epochs/num_epochs:208/1000\n",
      "loss = 0.4685714285714286, epochs/num_epochs:209/1000\n",
      "loss = 0.4666666666666667, epochs/num_epochs:210/1000\n",
      "loss = 0.4666666666666667, epochs/num_epochs:211/1000\n",
      "loss = 0.4657142857142857, epochs/num_epochs:212/1000\n",
      "loss = 0.4657142857142857, epochs/num_epochs:213/1000\n",
      "loss = 0.46476190476190476, epochs/num_epochs:214/1000\n",
      "loss = 0.46476190476190476, epochs/num_epochs:215/1000\n",
      "loss = 0.46, epochs/num_epochs:216/1000\n",
      "loss = 0.46, epochs/num_epochs:217/1000\n",
      "loss = 0.46, epochs/num_epochs:218/1000\n",
      "loss = 0.45904761904761904, epochs/num_epochs:219/1000\n",
      "loss = 0.4580952380952381, epochs/num_epochs:220/1000\n",
      "loss = 0.4580952380952381, epochs/num_epochs:221/1000\n",
      "loss = 0.4580952380952381, epochs/num_epochs:222/1000\n",
      "loss = 0.4552380952380952, epochs/num_epochs:223/1000\n",
      "loss = 0.4552380952380952, epochs/num_epochs:224/1000\n",
      "loss = 0.4552380952380952, epochs/num_epochs:225/1000\n",
      "loss = 0.4533333333333333, epochs/num_epochs:226/1000\n",
      "loss = 0.4514285714285714, epochs/num_epochs:227/1000\n",
      "loss = 0.44761904761904764, epochs/num_epochs:228/1000\n",
      "loss = 0.44476190476190475, epochs/num_epochs:229/1000\n",
      "loss = 0.44, epochs/num_epochs:230/1000\n",
      "loss = 0.4380952380952381, epochs/num_epochs:231/1000\n",
      "loss = 0.43714285714285717, epochs/num_epochs:232/1000\n",
      "loss = 0.43714285714285717, epochs/num_epochs:233/1000\n",
      "loss = 0.4361904761904762, epochs/num_epochs:234/1000\n",
      "loss = 0.4361904761904762, epochs/num_epochs:235/1000\n",
      "loss = 0.43523809523809526, epochs/num_epochs:236/1000\n",
      "loss = 0.4342857142857143, epochs/num_epochs:237/1000\n",
      "loss = 0.43333333333333335, epochs/num_epochs:238/1000\n",
      "loss = 0.43142857142857144, epochs/num_epochs:239/1000\n",
      "loss = 0.42857142857142855, epochs/num_epochs:240/1000\n",
      "loss = 0.43047619047619046, epochs/num_epochs:241/1000\n",
      "loss = 0.4266666666666667, epochs/num_epochs:242/1000\n",
      "loss = 0.4247619047619048, epochs/num_epochs:243/1000\n",
      "loss = 0.4238095238095238, epochs/num_epochs:244/1000\n",
      "loss = 0.4219047619047619, epochs/num_epochs:245/1000\n",
      "loss = 0.4219047619047619, epochs/num_epochs:246/1000\n",
      "loss = 0.4219047619047619, epochs/num_epochs:247/1000\n",
      "loss = 0.4238095238095238, epochs/num_epochs:248/1000\n",
      "loss = 0.4219047619047619, epochs/num_epochs:249/1000\n",
      "loss = 0.41904761904761906, epochs/num_epochs:250/1000\n",
      "loss = 0.41904761904761906, epochs/num_epochs:251/1000\n",
      "loss = 0.41714285714285715, epochs/num_epochs:252/1000\n",
      "loss = 0.41619047619047617, epochs/num_epochs:253/1000\n",
      "loss = 0.41523809523809524, epochs/num_epochs:254/1000\n",
      "loss = 0.4114285714285714, epochs/num_epochs:255/1000\n",
      "loss = 0.4085714285714286, epochs/num_epochs:256/1000\n",
      "loss = 0.40476190476190477, epochs/num_epochs:257/1000\n",
      "loss = 0.40285714285714286, epochs/num_epochs:258/1000\n",
      "loss = 0.40285714285714286, epochs/num_epochs:259/1000\n",
      "loss = 0.3952380952380952, epochs/num_epochs:260/1000\n",
      "loss = 0.38952380952380955, epochs/num_epochs:261/1000\n",
      "loss = 0.3838095238095238, epochs/num_epochs:262/1000\n",
      "loss = 0.38, epochs/num_epochs:263/1000\n",
      "loss = 0.379047619047619, epochs/num_epochs:264/1000\n",
      "loss = 0.37714285714285717, epochs/num_epochs:265/1000\n",
      "loss = 0.37333333333333335, epochs/num_epochs:266/1000\n",
      "loss = 0.37142857142857144, epochs/num_epochs:267/1000\n",
      "loss = 0.37047619047619046, epochs/num_epochs:268/1000\n",
      "loss = 0.36952380952380953, epochs/num_epochs:269/1000\n",
      "loss = 0.3676190476190476, epochs/num_epochs:270/1000\n",
      "loss = 0.3647619047619048, epochs/num_epochs:271/1000\n",
      "loss = 0.3628571428571429, epochs/num_epochs:272/1000\n",
      "loss = 0.36, epochs/num_epochs:273/1000\n",
      "loss = 0.36, epochs/num_epochs:274/1000\n",
      "loss = 0.3580952380952381, epochs/num_epochs:275/1000\n",
      "loss = 0.3580952380952381, epochs/num_epochs:276/1000\n",
      "loss = 0.35714285714285715, epochs/num_epochs:277/1000\n",
      "loss = 0.35714285714285715, epochs/num_epochs:278/1000\n",
      "loss = 0.3523809523809524, epochs/num_epochs:279/1000\n",
      "loss = 0.3514285714285714, epochs/num_epochs:280/1000\n",
      "loss = 0.3504761904761905, epochs/num_epochs:281/1000\n",
      "loss = 0.3485714285714286, epochs/num_epochs:282/1000\n",
      "loss = 0.3457142857142857, epochs/num_epochs:283/1000\n",
      "loss = 0.3457142857142857, epochs/num_epochs:284/1000\n",
      "loss = 0.3457142857142857, epochs/num_epochs:285/1000\n",
      "loss = 0.34476190476190477, epochs/num_epochs:286/1000\n",
      "loss = 0.34285714285714286, epochs/num_epochs:287/1000\n",
      "loss = 0.34285714285714286, epochs/num_epochs:288/1000\n",
      "loss = 0.34, epochs/num_epochs:289/1000\n",
      "loss = 0.34095238095238095, epochs/num_epochs:290/1000\n",
      "loss = 0.34, epochs/num_epochs:291/1000\n",
      "loss = 0.33714285714285713, epochs/num_epochs:292/1000\n",
      "loss = 0.3342857142857143, epochs/num_epochs:293/1000\n",
      "loss = 0.3342857142857143, epochs/num_epochs:294/1000\n",
      "loss = 0.3333333333333333, epochs/num_epochs:295/1000\n",
      "loss = 0.3314285714285714, epochs/num_epochs:296/1000\n",
      "loss = 0.32666666666666666, epochs/num_epochs:297/1000\n",
      "loss = 0.32285714285714284, epochs/num_epochs:298/1000\n",
      "loss = 0.32, epochs/num_epochs:299/1000\n",
      "loss = 0.3161904761904762, epochs/num_epochs:300/1000\n",
      "loss = 0.31523809523809526, epochs/num_epochs:301/1000\n",
      "loss = 0.3142857142857143, epochs/num_epochs:302/1000\n",
      "loss = 0.31238095238095237, epochs/num_epochs:303/1000\n",
      "loss = 0.31047619047619046, epochs/num_epochs:304/1000\n",
      "loss = 0.31047619047619046, epochs/num_epochs:305/1000\n",
      "loss = 0.3057142857142857, epochs/num_epochs:306/1000\n",
      "loss = 0.30666666666666664, epochs/num_epochs:307/1000\n",
      "loss = 0.30095238095238097, epochs/num_epochs:308/1000\n",
      "loss = 0.3, epochs/num_epochs:309/1000\n",
      "loss = 0.29619047619047617, epochs/num_epochs:310/1000\n",
      "loss = 0.2923809523809524, epochs/num_epochs:311/1000\n",
      "loss = 0.2895238095238095, epochs/num_epochs:312/1000\n",
      "loss = 0.2876190476190476, epochs/num_epochs:313/1000\n",
      "loss = 0.2857142857142857, epochs/num_epochs:314/1000\n",
      "loss = 0.28285714285714286, epochs/num_epochs:315/1000\n",
      "loss = 0.27714285714285714, epochs/num_epochs:316/1000\n",
      "loss = 0.2714285714285714, epochs/num_epochs:317/1000\n",
      "loss = 0.26761904761904765, epochs/num_epochs:318/1000\n",
      "loss = 0.2619047619047619, epochs/num_epochs:319/1000\n",
      "loss = 0.26476190476190475, epochs/num_epochs:320/1000\n",
      "loss = 0.26, epochs/num_epochs:321/1000\n",
      "loss = 0.259047619047619, epochs/num_epochs:322/1000\n",
      "loss = 0.2571428571428571, epochs/num_epochs:323/1000\n",
      "loss = 0.2542857142857143, epochs/num_epochs:324/1000\n",
      "loss = 0.25333333333333335, epochs/num_epochs:325/1000\n",
      "loss = 0.2523809523809524, epochs/num_epochs:326/1000\n",
      "loss = 0.24952380952380954, epochs/num_epochs:327/1000\n",
      "loss = 0.24666666666666667, epochs/num_epochs:328/1000\n",
      "loss = 0.24476190476190476, epochs/num_epochs:329/1000\n",
      "loss = 0.2419047619047619, epochs/num_epochs:330/1000\n",
      "loss = 0.2438095238095238, epochs/num_epochs:331/1000\n",
      "loss = 0.24285714285714285, epochs/num_epochs:332/1000\n",
      "loss = 0.24095238095238095, epochs/num_epochs:333/1000\n",
      "loss = 0.24, epochs/num_epochs:334/1000\n",
      "loss = 0.24, epochs/num_epochs:335/1000\n",
      "loss = 0.23904761904761904, epochs/num_epochs:336/1000\n",
      "loss = 0.23809523809523808, epochs/num_epochs:337/1000\n",
      "loss = 0.2342857142857143, epochs/num_epochs:338/1000\n",
      "loss = 0.23238095238095238, epochs/num_epochs:339/1000\n",
      "loss = 0.23333333333333334, epochs/num_epochs:340/1000\n",
      "loss = 0.23142857142857143, epochs/num_epochs:341/1000\n",
      "loss = 0.23142857142857143, epochs/num_epochs:342/1000\n",
      "loss = 0.23142857142857143, epochs/num_epochs:343/1000\n",
      "loss = 0.23142857142857143, epochs/num_epochs:344/1000\n",
      "loss = 0.23238095238095238, epochs/num_epochs:345/1000\n",
      "loss = 0.22952380952380952, epochs/num_epochs:346/1000\n",
      "loss = 0.22857142857142856, epochs/num_epochs:347/1000\n",
      "loss = 0.22857142857142856, epochs/num_epochs:348/1000\n",
      "loss = 0.22666666666666666, epochs/num_epochs:349/1000\n",
      "loss = 0.22476190476190477, epochs/num_epochs:350/1000\n",
      "loss = 0.22285714285714286, epochs/num_epochs:351/1000\n",
      "loss = 0.22095238095238096, epochs/num_epochs:352/1000\n",
      "loss = 0.22095238095238096, epochs/num_epochs:353/1000\n",
      "loss = 0.21904761904761905, epochs/num_epochs:354/1000\n",
      "loss = 0.21619047619047618, epochs/num_epochs:355/1000\n",
      "loss = 0.21619047619047618, epochs/num_epochs:356/1000\n",
      "loss = 0.21333333333333335, epochs/num_epochs:357/1000\n",
      "loss = 0.21047619047619048, epochs/num_epochs:358/1000\n",
      "loss = 0.20952380952380953, epochs/num_epochs:359/1000\n",
      "loss = 0.20761904761904762, epochs/num_epochs:360/1000\n",
      "loss = 0.2057142857142857, epochs/num_epochs:361/1000\n",
      "loss = 0.20476190476190476, epochs/num_epochs:362/1000\n",
      "loss = 0.2038095238095238, epochs/num_epochs:363/1000\n",
      "loss = 0.20095238095238097, epochs/num_epochs:364/1000\n",
      "loss = 0.19904761904761906, epochs/num_epochs:365/1000\n",
      "loss = 0.1961904761904762, epochs/num_epochs:366/1000\n",
      "loss = 0.19333333333333333, epochs/num_epochs:367/1000\n",
      "loss = 0.1895238095238095, epochs/num_epochs:368/1000\n",
      "loss = 0.18761904761904763, epochs/num_epochs:369/1000\n",
      "loss = 0.18571428571428572, epochs/num_epochs:370/1000\n",
      "loss = 0.1838095238095238, epochs/num_epochs:371/1000\n",
      "loss = 0.18285714285714286, epochs/num_epochs:372/1000\n",
      "loss = 0.18095238095238095, epochs/num_epochs:373/1000\n",
      "loss = 0.17809523809523808, epochs/num_epochs:374/1000\n",
      "loss = 0.17714285714285713, epochs/num_epochs:375/1000\n",
      "loss = 0.1761904761904762, epochs/num_epochs:376/1000\n",
      "loss = 0.1761904761904762, epochs/num_epochs:377/1000\n",
      "loss = 0.17523809523809525, epochs/num_epochs:378/1000\n",
      "loss = 0.17142857142857143, epochs/num_epochs:379/1000\n",
      "loss = 0.17142857142857143, epochs/num_epochs:380/1000\n",
      "loss = 0.17047619047619048, epochs/num_epochs:381/1000\n",
      "loss = 0.16952380952380952, epochs/num_epochs:382/1000\n",
      "loss = 0.1657142857142857, epochs/num_epochs:383/1000\n",
      "loss = 0.16380952380952382, epochs/num_epochs:384/1000\n",
      "loss = 0.16380952380952382, epochs/num_epochs:385/1000\n",
      "loss = 0.16095238095238096, epochs/num_epochs:386/1000\n",
      "loss = 0.1619047619047619, epochs/num_epochs:387/1000\n",
      "loss = 0.16095238095238096, epochs/num_epochs:388/1000\n",
      "loss = 0.1580952380952381, epochs/num_epochs:389/1000\n",
      "loss = 0.1580952380952381, epochs/num_epochs:390/1000\n",
      "loss = 0.15714285714285714, epochs/num_epochs:391/1000\n",
      "loss = 0.15714285714285714, epochs/num_epochs:392/1000\n",
      "loss = 0.15619047619047619, epochs/num_epochs:393/1000\n",
      "loss = 0.15619047619047619, epochs/num_epochs:394/1000\n",
      "loss = 0.15333333333333332, epochs/num_epochs:395/1000\n",
      "loss = 0.1523809523809524, epochs/num_epochs:396/1000\n",
      "loss = 0.15142857142857144, epochs/num_epochs:397/1000\n",
      "loss = 0.14952380952380953, epochs/num_epochs:398/1000\n",
      "loss = 0.14952380952380953, epochs/num_epochs:399/1000\n",
      "loss = 0.14952380952380953, epochs/num_epochs:400/1000\n",
      "loss = 0.14952380952380953, epochs/num_epochs:401/1000\n",
      "loss = 0.14952380952380953, epochs/num_epochs:402/1000\n",
      "loss = 0.14857142857142858, epochs/num_epochs:403/1000\n",
      "loss = 0.14857142857142858, epochs/num_epochs:404/1000\n",
      "loss = 0.14857142857142858, epochs/num_epochs:405/1000\n",
      "loss = 0.14666666666666667, epochs/num_epochs:406/1000\n",
      "loss = 0.14666666666666667, epochs/num_epochs:407/1000\n",
      "loss = 0.14761904761904762, epochs/num_epochs:408/1000\n",
      "loss = 0.14761904761904762, epochs/num_epochs:409/1000\n",
      "loss = 0.14666666666666667, epochs/num_epochs:410/1000\n",
      "loss = 0.1457142857142857, epochs/num_epochs:411/1000\n",
      "loss = 0.14476190476190476, epochs/num_epochs:412/1000\n",
      "loss = 0.14476190476190476, epochs/num_epochs:413/1000\n",
      "loss = 0.1457142857142857, epochs/num_epochs:414/1000\n",
      "loss = 0.1438095238095238, epochs/num_epochs:415/1000\n",
      "loss = 0.14285714285714285, epochs/num_epochs:416/1000\n",
      "loss = 0.1419047619047619, epochs/num_epochs:417/1000\n",
      "loss = 0.14095238095238094, epochs/num_epochs:418/1000\n",
      "loss = 0.13904761904761906, epochs/num_epochs:419/1000\n",
      "loss = 0.1380952380952381, epochs/num_epochs:420/1000\n",
      "loss = 0.13714285714285715, epochs/num_epochs:421/1000\n",
      "loss = 0.13523809523809524, epochs/num_epochs:422/1000\n",
      "loss = 0.1361904761904762, epochs/num_epochs:423/1000\n",
      "loss = 0.13523809523809524, epochs/num_epochs:424/1000\n",
      "loss = 0.13428571428571429, epochs/num_epochs:425/1000\n",
      "loss = 0.13238095238095238, epochs/num_epochs:426/1000\n",
      "loss = 0.13238095238095238, epochs/num_epochs:427/1000\n",
      "loss = 0.13142857142857142, epochs/num_epochs:428/1000\n",
      "loss = 0.13142857142857142, epochs/num_epochs:429/1000\n",
      "loss = 0.13047619047619047, epochs/num_epochs:430/1000\n",
      "loss = 0.13047619047619047, epochs/num_epochs:431/1000\n",
      "loss = 0.12857142857142856, epochs/num_epochs:432/1000\n",
      "loss = 0.1295238095238095, epochs/num_epochs:433/1000\n",
      "loss = 0.12761904761904763, epochs/num_epochs:434/1000\n",
      "loss = 0.12666666666666668, epochs/num_epochs:435/1000\n",
      "loss = 0.12666666666666668, epochs/num_epochs:436/1000\n",
      "loss = 0.12571428571428572, epochs/num_epochs:437/1000\n",
      "loss = 0.12571428571428572, epochs/num_epochs:438/1000\n",
      "loss = 0.12476190476190477, epochs/num_epochs:439/1000\n",
      "loss = 0.12476190476190477, epochs/num_epochs:440/1000\n",
      "loss = 0.12476190476190477, epochs/num_epochs:441/1000\n",
      "loss = 0.12476190476190477, epochs/num_epochs:442/1000\n",
      "loss = 0.12380952380952381, epochs/num_epochs:443/1000\n",
      "loss = 0.12380952380952381, epochs/num_epochs:444/1000\n",
      "loss = 0.12380952380952381, epochs/num_epochs:445/1000\n",
      "loss = 0.12285714285714286, epochs/num_epochs:446/1000\n",
      "loss = 0.1180952380952381, epochs/num_epochs:447/1000\n",
      "loss = 0.11714285714285715, epochs/num_epochs:448/1000\n",
      "loss = 0.11619047619047619, epochs/num_epochs:449/1000\n",
      "loss = 0.11523809523809524, epochs/num_epochs:450/1000\n",
      "loss = 0.11428571428571428, epochs/num_epochs:451/1000\n",
      "loss = 0.11428571428571428, epochs/num_epochs:452/1000\n",
      "loss = 0.11238095238095239, epochs/num_epochs:453/1000\n",
      "loss = 0.10952380952380952, epochs/num_epochs:454/1000\n",
      "loss = 0.11047619047619048, epochs/num_epochs:455/1000\n",
      "loss = 0.10761904761904761, epochs/num_epochs:456/1000\n",
      "loss = 0.10857142857142857, epochs/num_epochs:457/1000\n",
      "loss = 0.10476190476190476, epochs/num_epochs:458/1000\n",
      "loss = 0.10666666666666667, epochs/num_epochs:459/1000\n",
      "loss = 0.10571428571428572, epochs/num_epochs:460/1000\n",
      "loss = 0.10666666666666667, epochs/num_epochs:461/1000\n",
      "loss = 0.10285714285714286, epochs/num_epochs:462/1000\n",
      "loss = 0.10571428571428572, epochs/num_epochs:463/1000\n",
      "loss = 0.10095238095238095, epochs/num_epochs:464/1000\n",
      "loss = 0.10285714285714286, epochs/num_epochs:465/1000\n",
      "loss = 0.1019047619047619, epochs/num_epochs:466/1000\n",
      "loss = 0.10095238095238095, epochs/num_epochs:467/1000\n",
      "loss = 0.09904761904761905, epochs/num_epochs:468/1000\n",
      "loss = 0.09619047619047619, epochs/num_epochs:469/1000\n",
      "loss = 0.10095238095238095, epochs/num_epochs:470/1000\n",
      "loss = 0.09238095238095238, epochs/num_epochs:471/1000\n",
      "loss = 0.09714285714285714, epochs/num_epochs:472/1000\n",
      "loss = 0.08952380952380952, epochs/num_epochs:473/1000\n",
      "loss = 0.09523809523809523, epochs/num_epochs:474/1000\n",
      "loss = 0.09333333333333334, epochs/num_epochs:475/1000\n",
      "loss = 0.09238095238095238, epochs/num_epochs:476/1000\n",
      "loss = 0.09047619047619047, epochs/num_epochs:477/1000\n",
      "loss = 0.09047619047619047, epochs/num_epochs:478/1000\n",
      "loss = 0.08857142857142856, epochs/num_epochs:479/1000\n",
      "loss = 0.08952380952380952, epochs/num_epochs:480/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:481/1000\n",
      "loss = 0.08761904761904762, epochs/num_epochs:482/1000\n",
      "loss = 0.08571428571428572, epochs/num_epochs:483/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:484/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:485/1000\n",
      "loss = 0.08857142857142856, epochs/num_epochs:486/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:487/1000\n",
      "loss = 0.08761904761904762, epochs/num_epochs:488/1000\n",
      "loss = 0.08571428571428572, epochs/num_epochs:489/1000\n",
      "loss = 0.08571428571428572, epochs/num_epochs:490/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:491/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:492/1000\n",
      "loss = 0.08761904761904762, epochs/num_epochs:493/1000\n",
      "loss = 0.08761904761904762, epochs/num_epochs:494/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:495/1000\n",
      "loss = 0.08666666666666667, epochs/num_epochs:496/1000\n",
      "loss = 0.08571428571428572, epochs/num_epochs:497/1000\n",
      "loss = 0.08571428571428572, epochs/num_epochs:498/1000\n",
      "loss = 0.0838095238095238, epochs/num_epochs:499/1000\n",
      "loss = 0.0838095238095238, epochs/num_epochs:500/1000\n",
      "loss = 0.0838095238095238, epochs/num_epochs:501/1000\n",
      "loss = 0.08476190476190476, epochs/num_epochs:502/1000\n",
      "loss = 0.08285714285714285, epochs/num_epochs:503/1000\n",
      "loss = 0.08, epochs/num_epochs:504/1000\n",
      "loss = 0.08, epochs/num_epochs:505/1000\n",
      "loss = 0.08095238095238096, epochs/num_epochs:506/1000\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "loss = 0.08, epochs/num_epochs:507/1000\n",
      "loss = 0.07809523809523809, epochs/num_epochs:508/1000\n",
      "loss = 0.08190476190476191, epochs/num_epochs:509/1000\n",
      "loss = 0.07809523809523809, epochs/num_epochs:510/1000\n",
      "loss = 0.08190476190476191, epochs/num_epochs:511/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:512/1000\n",
      "loss = 0.08095238095238096, epochs/num_epochs:513/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:514/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:515/1000\n",
      "loss = 0.07809523809523809, epochs/num_epochs:516/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:517/1000\n",
      "loss = 0.07714285714285714, epochs/num_epochs:518/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:519/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:520/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:521/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:522/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:523/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:524/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:525/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:526/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:527/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:528/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:529/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:530/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:531/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:532/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:533/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:534/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:535/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:536/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:537/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:538/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:539/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:540/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:541/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:542/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:543/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:544/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:545/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:546/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:547/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:548/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:549/1000\n",
      "loss = 0.07333333333333333, epochs/num_epochs:550/1000\n",
      "loss = 0.07714285714285714, epochs/num_epochs:551/1000\n",
      "loss = 0.07238095238095238, epochs/num_epochs:552/1000\n",
      "loss = 0.07714285714285714, epochs/num_epochs:553/1000\n",
      "loss = 0.07238095238095238, epochs/num_epochs:554/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:555/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:556/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:557/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:558/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:559/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:560/1000\n",
      "loss = 0.07809523809523809, epochs/num_epochs:561/1000\n",
      "loss = 0.07047619047619047, epochs/num_epochs:562/1000\n",
      "loss = 0.07714285714285714, epochs/num_epochs:563/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:564/1000\n",
      "loss = 0.07714285714285714, epochs/num_epochs:565/1000\n",
      "loss = 0.07047619047619047, epochs/num_epochs:566/1000\n",
      "loss = 0.0761904761904762, epochs/num_epochs:567/1000\n",
      "loss = 0.07047619047619047, epochs/num_epochs:568/1000\n",
      "loss = 0.07523809523809524, epochs/num_epochs:569/1000\n",
      "loss = 0.07047619047619047, epochs/num_epochs:570/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:571/1000\n",
      "loss = 0.07047619047619047, epochs/num_epochs:572/1000\n",
      "loss = 0.07428571428571429, epochs/num_epochs:573/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:574/1000\n",
      "loss = 0.07047619047619047, epochs/num_epochs:575/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:576/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:577/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:578/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:579/1000\n",
      "loss = 0.07333333333333333, epochs/num_epochs:580/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:581/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:582/1000\n",
      "loss = 0.07238095238095238, epochs/num_epochs:583/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:584/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:585/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:586/1000\n",
      "loss = 0.07142857142857142, epochs/num_epochs:587/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:588/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:589/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:590/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:591/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:592/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:593/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:594/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:595/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:596/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:597/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:598/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:599/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:600/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:601/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:602/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:603/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:604/1000\n",
      "loss = 0.06952380952380953, epochs/num_epochs:605/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:606/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:607/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:608/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:609/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:610/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:611/1000\n",
      "loss = 0.06857142857142857, epochs/num_epochs:612/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:613/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:614/1000\n",
      "loss = 0.06761904761904762, epochs/num_epochs:615/1000\n",
      "loss = 0.06666666666666667, epochs/num_epochs:616/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:617/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:618/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:619/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:620/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:621/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:622/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:623/1000\n",
      "loss = 0.06476190476190476, epochs/num_epochs:624/1000\n",
      "loss = 0.06666666666666667, epochs/num_epochs:625/1000\n",
      "loss = 0.06571428571428571, epochs/num_epochs:626/1000\n",
      "loss = 0.06476190476190476, epochs/num_epochs:627/1000\n",
      "loss = 0.06476190476190476, epochs/num_epochs:628/1000\n",
      "loss = 0.06380952380952382, epochs/num_epochs:629/1000\n",
      "loss = 0.06476190476190476, epochs/num_epochs:630/1000\n",
      "loss = 0.06380952380952382, epochs/num_epochs:631/1000\n",
      "loss = 0.06476190476190476, epochs/num_epochs:632/1000\n",
      "loss = 0.06285714285714286, epochs/num_epochs:633/1000\n",
      "loss = 0.06476190476190476, epochs/num_epochs:634/1000\n",
      "loss = 0.06190476190476191, epochs/num_epochs:635/1000\n",
      "loss = 0.06285714285714286, epochs/num_epochs:636/1000\n",
      "loss = 0.06095238095238095, epochs/num_epochs:637/1000\n",
      "loss = 0.06190476190476191, epochs/num_epochs:638/1000\n",
      "loss = 0.06190476190476191, epochs/num_epochs:639/1000\n",
      "loss = 0.06285714285714286, epochs/num_epochs:640/1000\n",
      "loss = 0.06190476190476191, epochs/num_epochs:641/1000\n",
      "loss = 0.06095238095238095, epochs/num_epochs:642/1000\n",
      "loss = 0.06095238095238095, epochs/num_epochs:643/1000\n",
      "loss = 0.06190476190476191, epochs/num_epochs:644/1000\n",
      "loss = 0.06190476190476191, epochs/num_epochs:645/1000\n",
      "loss = 0.06095238095238095, epochs/num_epochs:646/1000\n",
      "loss = 0.058095238095238096, epochs/num_epochs:647/1000\n",
      "loss = 0.05904761904761905, epochs/num_epochs:648/1000\n",
      "loss = 0.05904761904761905, epochs/num_epochs:649/1000\n",
      "loss = 0.058095238095238096, epochs/num_epochs:650/1000\n",
      "loss = 0.05714285714285714, epochs/num_epochs:651/1000\n",
      "loss = 0.05904761904761905, epochs/num_epochs:652/1000\n",
      "loss = 0.05714285714285714, epochs/num_epochs:653/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:654/1000\n",
      "loss = 0.058095238095238096, epochs/num_epochs:655/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:656/1000\n",
      "loss = 0.058095238095238096, epochs/num_epochs:657/1000\n",
      "loss = 0.054285714285714284, epochs/num_epochs:658/1000\n",
      "loss = 0.058095238095238096, epochs/num_epochs:659/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:660/1000\n",
      "loss = 0.058095238095238096, epochs/num_epochs:661/1000\n",
      "loss = 0.05619047619047619, epochs/num_epochs:662/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:663/1000\n",
      "loss = 0.05619047619047619, epochs/num_epochs:664/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:665/1000\n",
      "loss = 0.05619047619047619, epochs/num_epochs:666/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:667/1000\n",
      "loss = 0.05619047619047619, epochs/num_epochs:668/1000\n",
      "loss = 0.05619047619047619, epochs/num_epochs:669/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:670/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:671/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:672/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:673/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:674/1000\n",
      "loss = 0.054285714285714284, epochs/num_epochs:675/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:676/1000\n",
      "loss = 0.05523809523809524, epochs/num_epochs:677/1000\n",
      "loss = 0.05714285714285714, epochs/num_epochs:678/1000\n",
      "loss = 0.054285714285714284, epochs/num_epochs:679/1000\n",
      "loss = 0.054285714285714284, epochs/num_epochs:680/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:681/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:682/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:683/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:684/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:685/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:686/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:687/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:688/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:689/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:690/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:691/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:692/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:693/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:694/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:695/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:696/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:697/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:698/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:699/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:700/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:701/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:702/1000\n",
      "loss = 0.054285714285714284, epochs/num_epochs:703/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:704/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:705/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:706/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:707/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:708/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:709/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:710/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:711/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:712/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:713/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:714/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:715/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:716/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:717/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:718/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:719/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:720/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:721/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:722/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:723/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:724/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:725/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:726/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:727/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:728/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:729/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:730/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:731/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:732/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:733/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:734/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:735/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:736/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:737/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:738/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:739/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:740/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:741/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:742/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:743/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:744/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:745/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:746/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:747/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:748/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:749/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:750/1000\n",
      "loss = 0.05333333333333334, epochs/num_epochs:751/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:752/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:753/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:754/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:755/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:756/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:757/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:758/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:759/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:760/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:761/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:762/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:763/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:764/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:765/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:766/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:767/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:768/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:769/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:770/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:771/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:772/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:773/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:774/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:775/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:776/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:777/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:778/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:779/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:780/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:781/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:782/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:783/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:784/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:785/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:786/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:787/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:788/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:789/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:790/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:791/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:792/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:793/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:794/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:795/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:796/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:797/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:798/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:799/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:800/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:801/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:802/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:803/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:804/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:805/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:806/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:807/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:808/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:809/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:810/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:811/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:812/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:813/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:814/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:815/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:816/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:817/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:818/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:819/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:820/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:821/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:822/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:823/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:824/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:825/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:826/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:827/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:828/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:829/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:830/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:831/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:832/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:833/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:834/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:835/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:836/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:837/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:838/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:839/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:840/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:841/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:842/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:843/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:844/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:845/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:846/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:847/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:848/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:849/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:850/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:851/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:852/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:853/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:854/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:855/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:856/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:857/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:858/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:859/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:860/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:861/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:862/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:863/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:864/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:865/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:866/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:867/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:868/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:869/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:870/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:871/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:872/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:873/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:874/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:875/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:876/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:877/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:878/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:879/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:880/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:881/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:882/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:883/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:884/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:885/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:886/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:887/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:888/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:889/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:890/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:891/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:892/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:893/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:894/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:895/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:896/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:897/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:898/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:899/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:900/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:901/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:902/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:903/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:904/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:905/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:906/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:907/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:908/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:909/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:910/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:911/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:912/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:913/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:914/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:915/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:916/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:917/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:918/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:919/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:920/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:921/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:922/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:923/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:924/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:925/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:926/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:927/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:928/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:929/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:930/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:931/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:932/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:933/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:934/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:935/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:936/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:937/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:938/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:939/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:940/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:941/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:942/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:943/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:944/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:945/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:946/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:947/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:948/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:949/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:950/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:951/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:952/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:953/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:954/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:955/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:956/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:957/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:958/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:959/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:960/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:961/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:962/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:963/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:964/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:965/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:966/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:967/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:968/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:969/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:970/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:971/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:972/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:973/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:974/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:975/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:976/1000\n",
      "loss = 0.05238095238095238, epochs/num_epochs:977/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:978/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:979/1000\n",
      "loss = 0.05142857142857143, epochs/num_epochs:980/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:981/1000\n",
      "loss = 0.049523809523809526, epochs/num_epochs:982/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:983/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:984/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:985/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:986/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:987/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:988/1000\n",
      "loss = 0.04666666666666667, epochs/num_epochs:989/1000\n",
      "loss = 0.047619047619047616, epochs/num_epochs:990/1000\n",
      "loss = 0.045714285714285714, epochs/num_epochs:991/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:992/1000\n",
      "loss = 0.045714285714285714, epochs/num_epochs:993/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:994/1000\n",
      "loss = 0.045714285714285714, epochs/num_epochs:995/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:996/1000\n",
      "loss = 0.045714285714285714, epochs/num_epochs:997/1000\n",
      "loss = 0.05047619047619047, epochs/num_epochs:998/1000\n",
      "loss = 0.045714285714285714, epochs/num_epochs:999/1000\n",
      "loss = 0.04857142857142857, epochs/num_epochs:1000/1000\n"
     ]
    }
   ],
   "source": [
    "X_train, X_test, y_train, y_test = train_test_split(data, target, test_size=0.3, random_state=42)\n",
    "bp = NeuralNetwork(data.shape[1], 10, len(np.unique(target)))\n",
    "bp.tarin(X_train, y_train.reshape((-1, 1)), 0.001, 1000)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
